package request

type CreateCronReq struct {
	CronName       string `json:"cron_name" binding:"required"`
	Classification string `json:"classification" binding:"required"`
	CronReqType    string `json:"cron_req_type" binding:"required"`
	CronExpr       string `json:"cron_expr" binding:"required"`
	CronDesc       string `json:"cron_desc" binding:"required"`
	CronUrl        string `json:"cron_url" binding:"required"`
	CronParam      string `json:"cron_param" binding:"required"`
	CronMethod     string `json:"cron_method" binding:"required"`
}

type UpdateCronReq struct {
	CronId int `json:"cron_id" binding:"required"`
	CreateCronReq
}

type StartOrStopCronReq struct {
	CronId  int `json:"cron_id" binding:"required"`
	OptType int `json:"opt_type" binding:"required"`
}

type ExecuteOnceCronReq struct {
	CronId int `json:"cron_id" binding:"required"`
}

type QueryCronReq struct {
	CronId   int    `json:"cron_id" `
	CronName string `json:"cron_name" `
	PageSize int32  `json:"page_size" `
	Page     int32  `json:"page"`
}

type GetCronDetailReq struct {
	CronId int `json:"cron_id" binding:"required"`
}

type UpdateCronStatus struct {
	CronId int `json:"cron_id" binding:"required"`
	Status int `json:"status" binding:"required"`
}
